FROM java:latest
RUN mkdir -p /opt/application/
COPY ./demo.jar /opt/application/demo.jar
WORKDIR /opt/application/
EXPOSE 8080:8080 5005:5005
VOLUME /tmp
ENV JAVA_OPTS="-server -Xms1024M -Xmx1024M -Xss512k -XX:PermSize=256M -XX:MaxPermSize=512M -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof"
ENTRYPOINT ["java","-jar","/opt/application/demo.jar"]